package com.bestcem.xm.award.grpc.service.param.bonus;

import com.bestcem.xm.common.core.constant.RegTypes;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * 红包入口参数
 *
 * @author ympan <yuming.pan@idiaoyan.com>
 * @version v3.0
 * @date 2021/8/17 16:46
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class GetRedPacketDrawParam {

    /**
     * 奖励id
     */
    @NotBlank(message = "奖励id不能为空")
    @Pattern(regexp = RegTypes.OBJECT_ID, message = "奖励id格式错误")
    @JsonProperty("id")
    private String awardId;
    /**
     * 用户授权code
     */
    @NotBlank(message = "用户授权code不能为空")
    private String code;

    /**
     * 请求id
     */
    @Pattern(regexp = RegTypes.OBJECT_ID, message = "requestId格式错误")
    @JsonProperty("request_id")
    private String requestId;
}
    